package com.lujianfei.netease_android_mvp.base

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

abstract class BasePresenter<V>(private val view: V) {
    var mView: V? = null
    init {
        mView = view
    }

    fun launchOnUI(block:suspend CoroutineScope.()->Unit) = CoroutineScope(Dispatchers.Main).launch { block() }
}